package com.xh.service.imp;

import com.xh.dao.PraiseMapper;
import com.xh.service.PraiseService;

import com.xh.vo.Praise;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class PraiseServiceImp implements PraiseService {
    @Resource
    private PraiseMapper praiseMapper;

    @Override
    public void newPraise(Praise praise) {
        praiseMapper.newPraise(praise);
    }

    @Override
    public List<Praise> queryPraise(Integer userId, Integer Bid) {
        return praiseMapper.queryPraise(userId,Bid);
    }
    @Override
    public void updatePraise(Integer state,Integer userId, Integer Bid) {
       praiseMapper.updatePraise(state,userId,Bid);
    }

    @Override
    public List<Praise> queryPraise2(Integer userId, Integer Bid) {
        return praiseMapper.queryPraise2(userId,Bid);
    }

}
